﻿# -*-coding: UTF-8 -*-
import logging


class CloverSystem:
	Instance = None
	logger: type[logging.Logger] = None

	def __init__(self, engine):
		self.engine = engine

	def start(self):
		pass

	def pre_tick(self, frame_start_time):
		pass

	def tick(self, delta_time):
		pass

	def post_tick(self, current_time, frame_time):
		pass

	def destroy(self):
		pass

	def register_event(self, event_name, function):
		self.engine.register_event(event_name, function)

	def unregister_event(self, event_name, function):
		self.engine.unregister_event(event_name, function)

	def info(self, message):
		self.logger.info(message)

	def error(self, message):
		self.logger.error(message, exc_info=True)

	def warning(self, message):
		self.logger.warning(message)

	def __repr__(self):
		return self.__class__.__name__

	def __str__(self):
		return self.__class__.__name__
